<template>
  <div>
    <van-nav-bar left-arrow @click-left="goBack" :border=false :z-index=1000></van-nav-bar>
    <van-search v-model="value" placeholder="输入商家、商品名称" show-action class="searchBody">
      <div slot="action">搜索</div>
    </van-search>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        value: ''
      }
    },
    methods: {
      goBack () {
        this.$router.go(-1)
      }
    }
  }
</script>

<style lang="less" scoped>
  .van-search {
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    box-sizing: border-box;
    padding-left: 0.7rem;
  }
  .van-search__content {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    height: 1.5rem;
    padding-left: 8px;
    padding-top: 0.2rem;
    background-color: #f8f8f8;
    border-radius: 2px
  }
  .van-field__control[type=search] {
    -webkit-appearance: none;
  }
  .van-search__action {
    padding: 0 8px;
    color: #323233;
    font-size: 0.9rem;
    padding-left: 0.5rem;
    font-weight: bold;
    line-height: 34px
  }
  .van-nav-bar {
    position: relative;
    height: 46px;
    line-height: 46px;
    text-align: center;
    padding-bottom: 2.5rem;
    background-color: #fff;
    -webkit-user-select: none;
    user-select: none
  }
  .van-nav-bar__left {
    top: 0.2rem;
    left: 0.2rem;
  }
  .van-nav-bar .van-icon {
    color: #888;
    font-size: 1.5rem;

    vertical-align: middle
  }
</style>
